﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.Model;
using Automobile.service.DAL;
using System.Data;

namespace Automobile.service.BLL
{
   public class StockBll
    {
       StockDal dal = new StockDal();
        /// <summary>
        /// 显示商品库存信息
        /// </summary>
        /// <returns></returns>
        public List<StockModel> Stock()
        {
            return dal.Stock();
        }
        /// <summary>
        /// 添加商品库存信息
        /// </summary>
        /// <returns></returns>
        public int AddStock(StockModel s)
        {
            return dal.AddStock(s);
        }
        /// <summary>
        /// 删除商品库存信息
        /// </summary>
        /// <returns></returns>
        public int DeleStock(int Stock_Id)
        {
            return dal.DeleStock(Stock_Id);
        }

        /// <summary>
        /// 取单个商品库存信息
        /// </summary>
        /// <returns></returns>
        public DataTable GetStock(string Stock_Id)
        {
            return dal.GetStock(Stock_Id);
        }

        /// <summary>
        /// 更新商品库存信息
        /// </summary>
        /// <param name="stu"></param>
        /// <returns></returns>
        public int UpdateStock(StockModel s)
        {
            return dal.UpdateStock(s);
        }
    }
}
